/* =============查找的find操作============ */
let arr1 = [{name:'李白'},{name:'杜甫'}]
let search1 = {name:'杜甫'}
let data1 = arr1.find((item) => { // 返回数据
    return item.name === search1.name
})
console.log('find查找:',data1)


/* =============查找的findIndex操作============ */
let arr2 = [{name:'李白'},{name:'杜甫'}]
let search2 = {name:'杜甫'}
let data2 = arr2.findIndex((item) => { // 返回下标
    return item.name == search2.name
})
